
REPLICATION MATERIALS: Signaling Race, Ethnicity, and Gender with Names: Challenges and Recommendations

There are three key code files:

**create_racial_distinctiveness_data.R**

Takes in:
-comb_longratings.csv, the raw indvidual name ratings 
-comb_lastnameratings.csv, the raw individual name ratings for last names
-firstnames.csv, Tzioumis et al.'s data on name race
	-data downloaded from https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/TYJKEZ
	-saved second sheet ("Data") as a .csv called "firstnames.csv"
-nc_voters.csv, data from the NC voter file on name gender
	-summarized to the name level and limited to relevant names

Performs the following tasks:
-estimates name characteristics from the ratings for first names, last names, and first-last pairs
-combines the estimated characteristics with the Tzioumis et al. and NC data 
-calculates racial distinctiveness scores

Exports: 
-comb_traitratings_withSEs.csv, a long dataset in which each row is a first name-trait pair, containing the estimate and standard error for each
-comb_traitratings.csv, a wide dataset in which each row is a first name and each column is a trait, containing estimates
-nameratings.csv, a wide dataset in which each row is a first name and each column is an attribute of the name, including "real" race and racial distinctiveness
-lastname_traitratings_withSEs.csv, a long dataset of last name traits including estimates and SEs
-lastname_traitratings.csv, a wide dataset of last name traits including estimates only
-firstlast_ratings.csv, a wide dataset of first-last name pairs including trait estimates


**reproduce_maintext_figures.R**

Takes in: 
-mturk_nametraits_withSEs.csv, a long dataset of estimates and SEs, from a supplemental sample for the experimental names
-experiment_rawdata.csv, a dataset with the results of our replication study
and several files from the previous step:
-comb_traitratings.csv
-nameratings.csv
-comb_traitratings_withSEs.csv

Performs the following tasks:
-creates descriptive figures of name characteristics and ratings
-analyzes the replication study
-produces the figures found in the main text

Exports:
-Figures/figure1.pdf
-Figures/figure2.pdf
-Figures/figure3.pdf
-Figures/figure4.pdf


**reproduce_appendix_figures.R**

Takes in:
-Welfare_study_rr_rep.csv, a dataset from a replication study extension
-qualtrics_image_IDs.csv, a key dataset of the images from the study
and products from previous steps:
-nameratings.csv
-comb_traitratings.csv
-comb_traitratings_withSEs.csv

Performs the following tasks:
-runs analyses reported in the appendix

Exports:
-with_group.pdf, from section S3.1 on intragroup variation
-updated_bw_group.pdf, from section S3.2 on intergroup variation
-(prints LaTeX code to reproduce table S11)
-gender_real.pdf, from section S5 on gender-distinctive names
-voterfile_mortgage.pdf, from section S6 comparing the voter file and mortgage data
-mortgage_vs_rated.csv, from section S6 comparing mortgage data and ratings
-full_desante_nametraits.pdf, from section S8.1 comparing all experimental names' traits
-excellentworkers.pdf, from section S8.3 on excellent workers' experimental results
-randomization_replication_results.pdf, from section S8.5 on the randomization replication